---@class SkillEffect342100:BaseSkillEffect
SkillEffect342100 = ClientFight.CreateClass("SkillEffect342100",ClientFight.BaseSkillEffect)
local t = SkillEffect342100

---@param skill FightUsingSkill
function t:triggerSkills(skill)
    local fighter = skill.fighter
    local target = skill.target
    local fight = skill.fight
    local skillBean = skill.skill.skillBean
    local frame;
    local skillScriptParam = skill.skill.skillBean.f_SkillScriptParameter
    local killAmount = tonumber(fighter.parametersByObject[SkillEffect342101.SKILL_EFFECT_342101_KILL_AMOUNT] ) or 0
    for i = 1,killAmount + 1 do
        if (skillScriptParam[1] > 0) then
        frame = math.ceil(skillScriptParam[1] / skill.speed/ Global.FIGHT_FRAME);
        else
            frame = skillScriptParam[1];
        end
        if (frame ~= 0) then
            local logFrame = frame;
        SkillRoleMgr.savePathFile( string.format("[%s][SKILL]%s对%s使用技能%s在%s帧后触发子技能%s",
        fight.frame, fighter.fighterId, target.fighterId, skillBean.f_SkillID, logFrame, skillScriptParam[1]
        ));
            local triggerSkills;
            local triggerFrame = frame
            if (triggerFrame > 0) then
                triggerFrame = triggerFrame + skill.frame
            end
            if (skill.triggerFrames[triggerFrame]) then
                triggerSkills = skill.triggerFrames[triggerFrame]
            else
                triggerSkills = {}
                skill.triggerFrames[triggerFrame] = triggerSkills
            end
            table.insert(triggerSkills,skillScriptParam[2])
        else
        SkillRoleMgr.savePathFile( string.format("[%s][SKILL]%s对%s使用技能%s立即触发子技能",
        fight.frame, fighter.fighterId, target.fighterId, skillBean.f_SkillID
       ));
            SkillManager.triggerSkill(skill, nil, skillScriptParam[2]);
        end
    end
end

t.New()